package com.ruiyian.project.log.service.impl;

import com.ruiyian.common.vo.LineVo;
import com.ruiyian.project.log.domain.OperationLog;
import com.ruiyian.project.log.domain.PlanLogMain;
import com.ruiyian.project.log.mapper.OperationLogMapper;
import com.ruiyian.project.log.mapper.PlanLogMainMapper;
import com.ruiyian.project.log.service.PlanLogMainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author chong
 * @email 673426164@qq.com
 * @create 2021/1/26
 * Desc: 预案日志实现
 */
@Service
public class PlanLogMainServiceImpl implements PlanLogMainService {
    @Autowired
    private PlanLogMainMapper planLogMainMapper;
    @Autowired
    private OperationLogMapper operationLogMapper;

    /**
     * 保存
     * @param planLogMain
     */
    @Override
    public void save(PlanLogMain planLogMain) {
        planLogMainMapper.save(planLogMain);
    }

    /**
     * 查询
     * @param planLogMain
     * @return
     */
    @Override
    public List<PlanLogMain> selectList(PlanLogMain planLogMain) {
        return planLogMainMapper.selectList(planLogMain);
    }

    /**
     * 根据id获取对象
     * @param id
     * @return
     */
    @Override
    public PlanLogMain findOne(Long id) {
        return planLogMainMapper.findOne(id);
    }

    /**
     * 预案统计
     * @return
     */
    @Override
    public List<LineVo> selectLine(PlanLogMain planLogMain) {
        return planLogMainMapper.selectLine(planLogMain);
    }

    /**
     * 隧道日志查询
     * @param planLogMain
     * @return
     */
    @Override
    public List<OperationLog> selectLogList(PlanLogMain planLogMain) {
        return operationLogMapper.selectLogList(planLogMain);
    }
}
